<ion-header>
  <ion-navbar>
    <ion-title>Home</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <div id="carousel">
    <ion-slides>
      <ion-slide>
        <a [href]="" class="carousel-link">
          <img src="https://gw.alicdn.com/imgextra/i4/190/TB2zimGfBDH8KJjSszcXXbDTFXa_!!190-0-lubanu.jpg_q50.jpg" />
        </a>
      </ion-slide>
      <ion-slide>
        <a [href]="" class="carousel-link">
          <img src="https://aecpm.alicdn.com/simba/img/TB14ab1KpXXXXclXFXXSutbFXXX.jpg_q50.jpg" />
        </a>
      </ion-slide>
      <ion-slide>
        <a [href]="" class="carousel-link">
          <img src="https://gw.alicdn.com/imgextra/i4/190/TB2zimGfBDH8KJjSszcXXbDTFXa_!!190-0-lubanu.jpg_q50.jpg" />
        </a>
      </ion-slide>
      <div class="carousel-panel">
        <a href="javascript:;"></a>
        <a href="javascript:;"></a>
        <a href="javascript:;"></a>
      </div>
    </ion-slides>
  </div>
  <!-- menu -->
  <div class="menu">

  </div>
  <div *ngIf="!user">

    <button ion-button (click)="goLogin()">登录</button>
  </div>
  <div *ngIf="user">
    <ion-searchbar (ionInput)="searchItem($event)"></ion-searchbar>
    <ion-list id="chatList">
      <ion-item *ngFor="let item of items">
        {{ item }}
      </ion-item>

      <ion-item *ngIf="noList">
        暂无会话
      </ion-item>
    </ion-list>
  </div>

  <ion-item>
    <ion-label stacked>Set Nickname</ion-label>
    <ion-input type="text" [(ngModel)]="nickname" placeholder="Nickname"></ion-input>
  </ion-item>
  <button ion-button full (click)="joinChat()" [disabled]="nickname === ''">Join Chat as {{ nickname }}</button>

  
</ion-content>